#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ix-nis

. /etc/rc.freenas

nis_start()
{
        if dirsrv_enabled nis
        then
                LD_LIBRARY_PATH=/usr/local/lib /usr/local/www/freenasUI/tools/cachetool.py fill
        fi
}

nis_stop()
{
        LD_LIBRARY_PATH=/usr/local/lib /usr/local/www/freenasUI/tools/cachetool.py expire
}


name="ix-nis"
start_cmd='nis_start'
stop_cmd='nis_stop'
            
load_rc_config $name
run_rc_command "$1"
